home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
util
/
gnu
/
fileutils_3_3.lha
/
fileutils-3.3
/
configure.in
< prev
next >
Wrap
Text File
|
1992-08-01
|
3KB
|
126 lines
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/ls.c)
AC_SUBST(PROGS)dnl
AC_SUBST(LIBPROGS)dnl
AC_PROG_CC
AC_PROG_CPP
AC_GCC_TRADITIONAL
AC_PROG_RANLIB
AC_AIX
AC_MINIX
AC_ISC_POSIX
AC_HEADER_CHECK(limits.h, AC_DEFINE(HAVE_LIMITS_H))
AC_MAJOR_HEADER
AC_DIR_HEADER
AC_RETSIGTYPE
echo checking how to get list of mounted filesystems
# SVR4
AC_HEADER_EGREP(putmntent, sys/mnttab.h,
AC_DEFINE(MOUNTED_GETMNTENT2) mounted=1)
if test -z "$mounted"; then
# AIX.
AC_TEST_CPP([#include <fshelp.h>],
AC_DEFINE(MOUNTED_VMOUNT) mounted=1)
fi
if test -z "$mounted"; then
# SVR3
AC_TEST_CPP([#include <sys/statfs.h>
#include <sys/fstyp.h>
#include <mnttab.h>],
AC_DEFINE(MOUNTED_FREAD_FSTYP) mounted=1)
fi
if test -z "$mounted"; then
# 4.3BSD
AC_TEST_CPP([#include <mntent.h>],
AC_DEFINE(MOUNTED_GETMNTENT1) mounted=1)
fi
if test -z "$mounted"; then
# 4.4BSD
AC_HEADER_EGREP(MOUNT_UFS, sys/mount.h,
AC_DEFINE(MOUNTED_GETMNTINFO) mounted=1)
fi
if test -z "$mounted"; then
# Ultrix
AC_TEST_CPP([#include <sys/fs_types.h>
#include <sys/mount.h>],
AC_DEFINE(MOUNTED_GETMNT) mounted=1)
fi
if test -z "$mounted"; then
# SVR2
AC_TEST_CPP([#include <mnttab.h>],
AC_DEFINE(MOUNTED_FREAD) mounted=1)
fi
echo checking how to get filesystem space usage
# SVR4
AC_TEST_CPP([#include <sys/statvfs.h>],
AC_DEFINE(STAT_STATVFS) space=1)
if test -z "$space"; then
# AIX
AC_HEADER_EGREP(f_nlsdirtype, sys/statfs.h,
AC_DEFINE(STAT_STATFS2_BSIZE) space=1)
fi
if test -z "$space"; then
# SVR3
AC_TEST_CPP([#include <sys/statfs.h>],
AC_DEFINE(STAT_STATFS4) space=1)
fi
if test -z "$space"; then
# 4.3BSD
AC_TEST_CPP([#include <sys/vfs.h>],
AC_DEFINE(STAT_STATFS2_BSIZE) space=1)
fi
if test -z "$space"; then
# 4.4BSD
AC_HEADER_EGREP(MOUNT_UFS, sys/mount.h,
AC_DEFINE(STAT_STATFS2_FSIZE) space=1)
fi
if test -z "$space"; then
# SVR2
AC_TEST_CPP([#include <sys/filsys.h>],
AC_DEFINE(STAT_READ) space=1)
fi
if test -z "$space"; then
# Ultrix
AC_TEST_CPP([#include <sys/mount.h>],
AC_DEFINE(STAT_STATFS2_FS_DATA) space=1)
fi
if test -n "$mounted" && test -n "$space"; then
PROGS="$PROGS df" LIBOBJS="$LIBOBJS fsusage.o mountlist.o"
fi
AC_UID_T
AC_INT_16_BITS
AC_STDC_HEADERS
AC_UNISTD_H
AC_USG
AC_REPLACE_FUNCS(fnmatch mkdir mktime stpcpy strdup strstr rename)
AC_HAVE_FUNCS(strerror fchmod ftime mkfifo)
AC_COMPILE_CHECK(ftruncate, , [ftruncate();],
AC_DEFINE(HAVE_FTRUNCATE), ftruncate_missing=1)
if test -n "$ftruncate_missing"; then
AC_COMPILE_CHECK(fcntl emulation of ftruncate,
[#include <sys/types.h>
#include <fcntl.h>], [
#if !defined(F_CHSIZE) && !defined(F_FREESP)
chsize();
#endif
], AC_DEFINE(HAVE_FTRUNCATE) LIBOBJS="$LIBOBJS ftruncate.o")
fi
case "$LIBOBJS" in
*rename.o*)
LIBPROGS="$LIBPROGS mvdir"
AC_DEFINE(MVDIR, \\\\\"\$(libdir)/mvdir\\\\\")
;;
esac
AC_VPRINTF
AC_ALLOCA
AC_ST_BLOCKS
AC_UTIME_NULL
AC_XENIX_DIR
AC_IRIX_SUN
AC_DYNIX_SEQ
AC_OUTPUT(Makefile lib/Makefile src/Makefile man/Makefile)